package com.example.myapplication.mainFragment;

import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.myapplication.HomemadeActivity;
import com.example.myapplication.R;


public class CollectionFragment extends Fragment {

    View view;

    public CollectionFragment() {
        // Required empty public constructor
    }


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        //initLayout();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        view =  inflater.inflate(R.layout.fragment_collection, container, false);



        TextView btn_list=view.findViewById(R.id.btn_list);
        RelativeLayout btn_list_all=view.findViewById(R.id.btn_list_all);

        btn_list_all.setAlpha(0);
        btn_list_all.setClickable(false);

        btn_list.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn_list.setAlpha(0);
                btn_list.setClickable(false);
                btn_list_all.setAlpha(1);
                btn_list_all.setClickable(true);
            }
        });

        btn_list_all.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                btn_list.setAlpha(1);
                btn_list.setClickable(true);
                btn_list_all.setAlpha(0);
                btn_list_all.setClickable(false);
            }
        });

        // Inflate the layout for this fragment
        return view;
    }


}